package com.mercury.ec.module.air.controller.admin.demandorder.vo.demandroute;

import com.mercury.ec.module.air.controller.admin.demandorder.vo.demandprice.AirDemandPriceQuoteReqVO;
import com.mercury.ec.module.air.controller.admin.demandorder.vo.demandroutesegment.AirDemandRouteSegmentQuoteReqVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 机票需求订单方案行程报价 Request VO")
@Data
public class AirDemandRouteQuoteReqVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27529")
    private Long id;

    @Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24503")
    private Long demandId;

    @Schema(description = "方案id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2103")
    private Long demandSchemeId;

    @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "序号不能为空")
    private Integer serialNo;

    @Schema(description = "pnr内容", example = "随便")
    private String pnrContent;

    @Schema(description = "采购商id 见表（basic_vendor.id）", requiredMode = Schema.RequiredMode.REQUIRED, example = "25808")
    @NotNull(message = "采购商id不能为空")
    private Long purchaseId;

    @Schema(description = "备注", example = "随便")
    @Length(max = 255, message = "备注长度不能超过255")
    private String remark;

    @Schema(description = "状态 字典（air_demand_route_status）", example = "2")
    private Integer status;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    private String creator;

    @Valid
    @NotEmpty(message = "行程航段列表不能为空")
    @Schema(description = "行程航段列表", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<AirDemandRouteSegmentQuoteReqVO> demandRouteSegments;

    @Valid
    @NotEmpty(message = "价格列表不能为空")
    @Schema(description = "价格列表", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<AirDemandPriceQuoteReqVO> demandPrices;
}
